package com.cheng.example.util.study.spring.beanutils;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

public class BeanUtilsTest{


    public static void main(String[] args) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException, InstantiationException {

        Course course = new Course();
        course.setName("语文课");
        Student student = new Student();
        student.setCourse(course);

        Student studentCoy = (Student) BeanUtils.cloneBean(student);
        course.setName("数学课");
        System.out.println(studentCoy);


    }
}
